#define  _CRT_SECURE_NO_WARNINGS 1
#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[] = { 0 };
	int a = 0;
	int b = 0;
	int lef = 0;
	int rig = sizeof(arr) / sizeof(arr[0]);
	while (scanf("%d", &a) != 0)
	{
		do
		{
			printf("%d %d\n", arr[lef], arr[rig]);
			rig--;
			lef++;
		} while (lef == sizeof(arr) / sizeof(arr[0]));
	}
	return 0;

}